package LocalClassifier;

import java.util.ArrayList;

import Global.ConstantVariable;
import Global.GlobalClass;
import InputPreparer.InputPreparationMethodInterface;
import Sampling.SamplingAbstractClass;

public class LocalClassifierTest {
	
	public static LocalClassifierInterface createDummyClassifier (String name, ArrayList<InputPreparationMethodInterface> inputPrepList, SamplingAbstractClass currentSampling, GlobalClass global)
	{
		if(name.equals(ConstantVariable.LocalClassifier_Constants.LOGISTIC_REGRESSION))
		{
			ArrayList< Object> paramList = new ArrayList<Object>();
			paramList.add(ConstantVariable.LocalClassifier_Constants.LOGISTIC_REGRESSION);
			paramList.add(10);
			paramList.add(inputPrepList);		
			LocalClassifierFactory LC_Factory =new LocalClassifierFactory();
			LocalClassifierInterface classifier =LC_Factory.createLocalClassifier(paramList, currentSampling, global);
			return classifier;
		}
		else if(name.equals(ConstantVariable.WekaClassifiers.GENERIC_WEKA_CLASSIFIER))
		{
			ArrayList< Object> paramList = new ArrayList<Object>();
			paramList.add(ConstantVariable.WekaClassifiers.GENERIC_WEKA_CLASSIFIER);			
			paramList.add(inputPrepList);		
			LocalClassifierFactory LC_Factory =new LocalClassifierFactory();
			LocalClassifierInterface classifier =LC_Factory.createLocalClassifier(paramList, currentSampling, global);
			return classifier;
		}
		else if(name.equals(ConstantVariable.LocalClassifier_Constants.AVERAGE))
		{
			ArrayList< Object> paramList = new ArrayList<Object>();
			paramList.add(ConstantVariable.LocalClassifier_Constants.AVERAGE);
			paramList.add(inputPrepList);		
			LocalClassifierFactory LC_Factory =new LocalClassifierFactory();
			LocalClassifierInterface classifier =LC_Factory.createLocalClassifier(paramList, currentSampling, global);
			return classifier;			
		}
		else if(name.equals(ConstantVariable.LocalClassifier_Constants.EXPERT_CLASSIFIER))
		{
			ArrayList< Object> paramList = new ArrayList<Object>();
			paramList.add(ConstantVariable.LocalClassifier_Constants.EXPERT_CLASSIFIER);
			paramList.add(inputPrepList);		
			LocalClassifierFactory LC_Factory =new LocalClassifierFactory();
			LocalClassifierInterface classifier =LC_Factory.createLocalClassifier(paramList, currentSampling, global);
			return classifier;			
		}
		else if(name.equals(ConstantVariable.LocalClassifier_Constants.LIAR_CLASSIFIER))
		{
			ArrayList< Object> paramList = new ArrayList<Object>();
			paramList.add(ConstantVariable.LocalClassifier_Constants.LIAR_CLASSIFIER);
			paramList.add(inputPrepList);		
			LocalClassifierFactory LC_Factory =new LocalClassifierFactory();
			LocalClassifierInterface classifier =LC_Factory.createLocalClassifier(paramList, currentSampling, global);
			return classifier;			
		}
		else
		{
			System.out.println("ERROR: No valid Local classifier is selected:"+name);
			System.exit(0);
			return null;
		}
	}

}
